// pages/travel//fillOrder/fillOrder.js
const util = require('../../../utils/util')
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    // date: "2020-12-10",
    searchinput: '',
    phoneinput: '',
    minusStatus: true,
    courseCount: 1,
    APP_OSSURL_API: app.APP_OSSURL_API,
    yjtImageUrl: "/dinnerBar/lvyou/lvyou-gengduo.png",
    dateImageUrl: "/dinnerBar/dingdan/dingdan-zailaiyidan.png",
    jiaImageUrl: "/dinnerBar/lvyou/ic_list_jia_bg%402x.png",
    jianImageUrl: "/dinnerBar/lvyou/ic_list_jian_bg%402x.png",
    quxiaoImageUrl: "/dinnerBar/ic_list_close_bg%402x.png",
    sjtImageUrl: "/dinnerBar/lvyou/lvyou-fangxiangshang.png",
    kefuImageUrl: "/dinnerBar/wode/kefurexian%402x.png"
  },
//点击清除输入框内容
  BeginSearch: function (e) {
    this.setData({
      searchinput: ''
    })
  },

  clearSearch: function (e) {
    this.setData({
      phoneinput: ''
    })
  },


  //数字加1
  addNum: function () {
    var courseCount = this.data.courseCount;
    courseCount++;
    this.setData({
      courseCount: courseCount,
      minusStatus: false
    })
  },
  //数字减1
  minusNum: function () {
    var courseCount = this.data.courseCount;
    if (courseCount > 1) {
      courseCount--;
    }
    //数字<=1时，开启 - 按钮的disable状态
    var minusStatus = courseCount <= 1 ? true : false;
    this.setData({
      courseCount: courseCount,
      minusStatus: minusStatus
    });
  },

  newlyIncreased: function (e) {
    wx.navigateTo({
      url: '../information/information',
    })
  },

    /**
   * 用餐时间/更改日期
   */
  changeDate: function (e) {
    console.log(e)
    var _this = this
    this.setData({
      date: e.detail.value
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})